package com.wicket.okrbff.web.contorller;

import com.wicket.okrbff.biz.service.PasswordService;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.BffUpdateCaptchaChangePasswordRespDto;
import com.wicket.okrbff.biz.service.dto.res.BffUpdateChangePasswordRespDto;
import com.wicket.okrbff.biz.service.dto.res.BffUpdateSetNewPasswordRespDto;
import com.wicket.okrbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrframework.integration.FwBasePasswordClient;
import com.wicket.okrframework.integration.dto.UpdateChangePasswordRespDto;
import com.wicket.okrframework.integration.dto.UpdateChangePasswordReqDto;
import com.wicket.okrbff.common.exception.Assert;
import com.wicket.okrbff.common.util.CommonFunctionHelper;
import com.wicket.okrframework.integration.FwBaseUserClient;
import com.wicket.okrframework.integration.dto.QueryUserDetailRespDto;
import com.wicket.okrframework.integration.dto.QueryUserDetailReqDto;
import com.wicket.okrframework.integration.FwBaseCaptchaClient;
import com.wicket.okrbff.biz.service.dto.res.CheckCaptchaValidRespDto;
import com.wicket.okrcomponent.integration.FwCompMessageClient;
import com.wicket.okrbff.biz.service.dto.res.BffUpdateForgotPasswordRespDto;
import com.wicket.okrframework.integration.dto.FindPasswordRespDto;
import com.wicket.okrframework.integration.dto.FindPasswordReqDto;
import com.wicket.okrcomponent.integration.dto.GenerateUserNoticeComRespDto;
import com.wicket.okrcomponent.integration.dto.GenerateUserNoticeComReqDto;
import com.wicket.okrframework.integration.FwBaseBaseClient;
import com.wicket.okrframework.integration.dto.QueryAppDetailComRespDto;
import com.wicket.okrframework.integration.dto.QueryAppDetailComReqDto;
import com.wicket.okrframework.integration.FwBaseMemberClient;
import com.wicket.okrframework.integration.dto.QueryMemberProfileDetailComRespDto;
import com.wicket.okrframework.integration.dto.QueryMemberProfileDetailComReqDto;
import com.wicket.okrcomponent.integration.dto.ImplementSendMessageChannelComRespDto;
import com.wicket.okrcomponent.integration.dto.ImplementSendMessageChannelComReqDto;
import com.wicket.okrbff.common.exception.BizException;
import com.wicket.okrcomponent.integration.dto.ImplementPushCacheSendMessageChannelComRespDto;
import com.wicket.okrcomponent.integration.dto.ImplementPushCacheSendMessageChannelComReqDto;
import com.wicket.okrapp.integration.FwAppMessageClient;
//import com.wicket.okrapp.integration.dto.ImplementPushCacheSendMessageChannelComRespDto;
//import com.wicket.okrapp.integration.dto.ImplementPushCacheSendMessageChannelComReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "Password", tags = {"Password"})
@RestController
// @RequestMapping("/oms/password/")
public class PasswordController {

    @Autowired
    PasswordService passwordService;

    /**
   * B1-2原密码修改密码
   * gen by moon at 8/10/2022, 3:33:10 AM
   */
    @PostMapping("/oms/password/updateChangePassword")
    @ApiOperation(value = "B1-2原密码修改密码", response = OkrResult.class)
    public OkrResult<BffUpdateChangePasswordRespDto> updateChangePassword(@RequestBody(required=false) @Validated BffUpdateChangePasswordReqDto reqDTO){
        return OkrResult.success(passwordService.updateChangePassword(reqDTO));
    }

    /**
   * B1-2验证码修改密码
   * gen by moon at 8/10/2022, 3:33:11 AM
   */
    @PostMapping("/oms/password/updateCaptchaChangePassword")
    @ApiOperation(value = "B1-2验证码修改密码", response = OkrResult.class)
    public OkrResult<BffUpdateCaptchaChangePasswordRespDto> updateCaptchaChangePassword(@RequestBody(required=false) @Validated BffUpdateCaptchaChangePasswordReqDto reqDTO){
        return OkrResult.success(passwordService.updateCaptchaChangePassword(reqDTO));
    }

    /**
   * B1-2忘记密码新密码
   * gen by moon at 8/10/2022, 3:29:30 AM
   */
    @PostMapping("/oms/password/updateSetNewPassword")
    @ApiOperation(value = "B1-2忘记密码新密码", response = OkrResult.class)
    public OkrResult<BffUpdateSetNewPasswordRespDto> updateSetNewPassword(@RequestBody(required=false) @Validated BffUpdateSetNewPasswordReqDto reqDTO){
        return OkrResult.success(passwordService.updateSetNewPassword(reqDTO));
    }
/**
   * B1-2修改忘记密码
   * gen by moon at 9/14/2022, 4:11:27 PM
   */
    @PostMapping("/oms/password/updateForgotPassword")
    @ApiOperation(value = "B1-2修改忘记密码", response = OkrResult.class)
    public OkrResult<BffUpdateForgotPasswordRespDto> updateForgotPassword(@RequestBody(required=false) @Validated BffUpdateForgotPasswordReqDto reqDTO){
        return OkrResult.success(passwordService.updateForgotPassword(reqDTO));
    }
}
